using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.Text.RegularExpressions;

public partial class StoredProcedures
{
    [Microsoft.SqlServer.Server.SqlProcedure]
    public static void RegExReplace(ref SqlString p_input, SqlString p_pattern, SqlString p_replacement)
    {
        string input = (string)p_input;
        string pattern = (string)p_pattern;
        string replacement = (string)p_replacement;
        p_input = (SqlString)Regex.Replace(input, pattern, replacement);
    }
}
